package one.stand.mapper;

import one.stand.model.ResultModel;
import one.stand.model.SecKillModel;
import one.stand.request.SecKillRequest;

import java.util.List;

/**
 * @author: Hongcj
 * @CreateDate: 2019/7/19 11:40
 * @Description:
 */
public interface SecKillMapper {

    /**
     * 查询
     * @param model
     * @return
     */
    SecKillModel selectKillGoodsInfo(SecKillModel model);

    /**
     * 秒杀列表
     * @param model
     * @return
     */
    List<SecKillModel> selectKillGoodsList(SecKillModel model);

    /**
     * 添加秒杀商品配置
     * @param model
     * @return
     */
    Integer addKillGoodsInfo(SecKillModel model);

    /**
     * 修改秒杀商品配置
     * @param model
     * @return
     */
    Integer updateByPrimaryKeySelective(SecKillModel model);

    /**
     * 秒杀列表编辑
     * @param model
     * @return
     */
    List<SecKillModel> updateKillGoodsInfo(SecKillModel model);

    /**
     * 该商品的总销量
     * @param model
     * @return
     */
    Integer selectTotalBuyNum(SecKillModel model);

    /**
     * 该商品的秒杀总销量
     * @param model
     * @return
     */
    Integer selectKillBuyNum(SecKillModel model);
}
